package com.hd.assistant.dal.dao.orderming;

import java.util.List;

import com.hd.assistant.dal.dao.exception.DAOException;
import com.hd.assistant.dal.dao.query.ordermining.NotifyMessageQuery;
import com.hd.assistant.dal.dataobject.ordermining.NotifyMessage;

public interface NotifyMessageDAO {

	void insertNotifyMessage(NotifyMessage message) throws DAOException;
	int updateMessageStatus(Long id,Integer status)throws DAOException;
	/**
	 * 最后一个值需要更新到上次已处理表
	 * @param fromNotInclude
	 * @param size
	 * @return
	 */
	List<NotifyMessage> getMessageByLimit(Long fromNotInclude,Integer size)throws DAOException;
	
	NotifyMessageQuery getMessageByQuery(NotifyMessageQuery query)throws DAOException;
	
	
	Long getLastProcessedId()throws DAOException;
	
	int updateLastProcessedId(Long lastProcessId)throws DAOException;
	
	boolean lock(String hostId,Integer timeoutSec)throws DAOException;
	
	boolean unLock(String hostId)throws DAOException;
}
